﻿using Microsoft.Extensions.Logging;
using System.Threading.Tasks;

namespace Fast.Extensions.EventBus.RabbitMQ.Subscribe.Tests
{
    public class TestEventHandler : IIntegrationEventHandler<TestEvent>
    {
        private readonly ILogger<TestEventHandler> _logger;
        public TestEventHandler(ILogger<TestEventHandler> logger)
        {
            _logger = logger;
        }
        public Task HandleAsync(TestEvent @event)
        {
            throw new System.ArgumentNullException("模拟异常");

            _logger.LogInformation("正常处理");

            return Task.CompletedTask;
        }
    }
}
